<template>
  <div>
    <van-checkbox shape="square" right-icon="video-o" v-bind="$attrs" v-on="$listeners" style="margin-bottom: 10px">
      <span @click="managerKeywords">
        <slot></slot>
      </span>
    </van-checkbox>

    <com-keyword-popup :key-name="keyName" v-model="show" :prop-name="propName" :key-id="keyId"
      prop-type="checkbox"></com-keyword-popup>
  </div>
</template>
<script>
import comKeywordPopup from './comKeywordPopup.vue';
import loginType from './loginType';
export default {
  name: 'comCheckbox',
  components: {
    comKeywordPopup
  },
  props: {
    propName: String,
    keyId: String,
    keyName: String
  },
  data() {
    return {
      show: false
    }
  },
  methods: {
    managerKeywords() {
      //alert("");
      if (loginType.isPrivateLogin()) {
        this.show = true;
        event.stopPropagation();
      }
    }
  }
}
</script>
<style scoped></style>